#ifndef TIMER_LINUX_H
#define TIMER_LINUX_H
#include <QtGlobal>
#ifdef Q_OS_LINUX
#include <tcl8.4/tcl.h>

Tcl_Time operator-(const Tcl_Time &l,const Tcl_Time &r);

float tclToS(const Tcl_Time &t);

class Timer {
public:
    Timer();

    void start();
    // returns the number of seconds since the last call to delta()
    float delta();

    // returns the number of seconds since start()
    float absolute();

private:
    Tcl_Time start_time;
    Tcl_Time current_time;
    Tcl_Time last_time;

    Tcl_Time store;
};
#endif
#endif // TIMER_LINUX_H
